package com.yuting.gateway.util;

import com.google.common.base.Splitter;

import java.util.List;

public class CommonUtil {

    final static  Splitter splitter = Splitter.on("/").trimResults();
    public static boolean isRegister(String path){
        List<String> strings = splitter.splitToList(path);
        for(String s : strings){
            System.out.println(s);
        }

        if(strings.get(3).equals("register")){
            return true;
        }else {
            return false;
        }
    }

    public static boolean needToken(String path){
        List<String> strings = splitter.splitToList(path);

        if(strings.get(2).equals("email")){
            return true;
        }else {
            return false;
        }
    }
}
